GBML manual / Backgrounds

perspective_floor_view

Sets how wide the perspective floor’s camera sees across the screen, in degrees. It starts at 90.

Game Boy: not available

Game Boy Color: not available

Sega Genesis: not built yet - The Sega Genesis will draw the road its own way.

On other consoles this differs: see Side by side and How the consoles differ.

Syntax

perspective_floor_view(degrees)

Arguments

NameType
degreesreal

Returns

Nothing.

Description

Sets how wide the perspective floor's camera sees across the screen, in degrees. It starts at 90 and is held between 20 and 160. It does nothing in a room that has no zoomable background.

A wide view stretches the road out sideways and makes the world feel fast. A narrow view pulls the far floor close. Change it while the game runs for a boost: widen it a little while the car speeds up.

Example

// Step event of the car: the view opens out as the car goes faster.
perspective_floor_view(90 + speed * 2);

At speed 0 the view is 90 degrees, at speed 10 it is 110.

On the GBA

A no-op in a room that has no zoomable background. Held between 20 and 160. A wide view stretches the road out sideways and makes the world feel fast; a narrow view pulls the far floor close. Change it for a boost: widen it a little while the car speeds up.

See also: Perspective floorperspective_floor_heightperspective_floor_cameraperspective_floor_horizon